﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Interop.Excel;
using ExcellData;

namespace ExcelUtilities12
{
	/// <summary>
	/// Classe que encapsula uma planilha de um documento excel
	/// </summary>
	public class Worksheet12 : IWorksheet
	{
		private Worksheet _InternalWorksheet;

		public Worksheet12(Worksheet sheet)
		{
			_InternalWorksheet = sheet;
		}

		public string Name
		{
			get { return _InternalWorksheet.Name; }
			set { _InternalWorksheet.Name = value; }
		}

		public Worksheet InternalWorksheet { get { return _InternalWorksheet; } }

		public void Delete()
		{
			_InternalWorksheet.Delete();
		}

		public void SaveAs(string path)
		{
			_InternalWorksheet.SaveAs(path, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
		}

		public IExcelRange get_Range(object Cell1, object Cell2)
		{
			return new Range12(_InternalWorksheet.get_Range(Cell1, Cell2));
		}
	}
}
